package com.cyanite.playlv2api.types;

import com.cyanite.playlv2api.util.ParcelUtils;

import android.os.Parcel;
import android.os.Parcelable;

public class Info implements PlayLv2Type, Parcelable {

    private String mInfo1;
    private String mInfo2;
    private String mInfo3;
    private String mInfo4;
    private String mInfo5;
    private int mInfoCount;

    public Info() {
        mInfo1 = "";
        mInfo2 = "";
        mInfo3 = "";
        mInfo4 = "";
        mInfo5 = "";
        mInfoCount = 0;
    }

    public int getInfoCount() {
        return mInfoCount;
    }

    public String getInfo1() {
        return mInfo1;
    }

    public void setInfo1(String info) {
        mInfoCount++;
        mInfo1 = info;
    }

    public String getInfo2() {
        return mInfo2;
    }

    public void setInfo2(String info) {
        mInfoCount++;
        mInfo2 = info;
    }

    public String getInfo3() {
        return mInfo3;
    }

    public void setInfo3(String info) {
        mInfoCount++;
        mInfo3 = info;
    }

    public String getInfo4() {
        return mInfo4;
    }

    public void setInfo4(String info) {
        mInfoCount++;
        mInfo4 = info;
    }

    public String getInfo5() {
        return mInfo5;
    }

    public void setInfo5(String info) {
        mInfoCount++;
        mInfo5 = info;
    }

    private Info(Parcel in) {
        mInfo1 = ParcelUtils.readStringFromParcel(in);
        mInfo2 = ParcelUtils.readStringFromParcel(in);
        mInfo3 = ParcelUtils.readStringFromParcel(in);
        mInfo4 = ParcelUtils.readStringFromParcel(in);
        mInfo5 = ParcelUtils.readStringFromParcel(in);
    }

    public static final Parcelable.Creator<Info> CREATOR = new Parcelable.Creator<Info>() {
        public Info createFromParcel(Parcel in) {
            return new Info(in);
        }

        @Override
        public Info[] newArray(int size) {
            return new Info[size];
        }
    };

    @Override
    public void writeToParcel(Parcel out, int flags) {
        ParcelUtils.writeStringToParcel(out, mInfo1);
        ParcelUtils.writeStringToParcel(out, mInfo2);
        ParcelUtils.writeStringToParcel(out, mInfo3);
        ParcelUtils.writeStringToParcel(out, mInfo4);
        ParcelUtils.writeStringToParcel(out, mInfo5);
    }

    @Override
    public int describeContents() {
        return 0;
    }
}
